<template>
  <view class="container">
    <!-- 顶部信息 -->
    <view class="header">
      <view class="user-info">
        <image class="user-logo" src="/static/logo.png" />
        <view class="user-details">
          <text class="user-name">刘永朝</text>
          <text class="user-phone">18283009915</text>
        </view>
      </view>
    </view>

    <!-- 余额与红包 -->
    <view class="balance">
      <view class="balance-item" @click="onBalanceClick">
        <text class="balance-amount">412</text>
        <text class="balance-label">余额</text>
      </view>
      <view class="balance-item" @click="onRedPacketClick">
        <text class="balance-amount">0</text>
        <text class="balance-label">红包</text>
      </view>
    </view>

    <!-- 功能菜单 -->
    <view class="menu">
      <view class="menu-item" @click="onTodayClick">
        <text>今日收支</text>
      </view>
      <view class="menu-item" @click="onHistoryClick">
        <text>往日收支</text>
      </view>
      <view class="menu-item" @click="onContractClick">
        <text>签约中心</text>
      </view>
      <view class="menu-item" @click="onAddressClick">
        <text>我的地址</text>
      </view>
      <view class="menu-item" @click="onPasswordClick">
        <text>修改密码</text>
      </view>
      <view class="menu-item" @click="onShareClick">
        <text>我的分享</text>
      </view>
    </view>

  </view>
</template>

<script>
export default {
  methods: {
    onBalanceClick() {
      console.log('余额被点击');
    },
    onRedPacketClick() {
      console.log('红包被点击');
    },
    onTodayClick() {
      console.log('今日收支被点击');
    },
    onHistoryClick() {
      console.log('往日收支被点击');
    },
    onContractClick() {
      console.log('签约中心被点击');
    },
    onAddressClick() {
      console.log('我的地址被点击');
    },
    onPasswordClick() {
      console.log('修改密码被点击');
    },
    onShareClick() {
      console.log('我的分享被点击');
    },
    onHomeClick() {
      console.log('首页被点击');
    },
    onGrabClick() {
      console.log('抢购被点击');
    },
    onWarehouseClick() {
      console.log('仓库被点击');
    },
    onProfileClick() {
      console.log('我的被点击');
    }
  }
};
</script>

<style>
.container {
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}

.header {
  background-color: #3CB371;
  padding: 20rpx;
  display: flex;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-logo {
  width: 80rpx;
  height: 80rpx;
  border-radius: 40rpx;
}

.user-details {
  margin-left: 20rpx;
}

.user-name,
.user-phone {
  color: #fff;
  font-size: 28rpx;
}

.balance {
  display: flex;
  justify-content: space-around;
  background-color: #fff;
  padding: 20rpx 0;
}

.balance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.balance-amount {
  color: #3CB371;
  font-size: 36rpx;
}

.balance-label {
  color: #555;
  font-size: 24rpx;
}

.menu {
  background-color: #fff;
  margin-top: 20rpx;
}

.menu-item {
  padding: 20rpx;
  border-bottom: 1rpx solid #eee;
}

.footer {
  display: flex;
  justify-content: space-around;
  padding: 20rpx 0;
  background-color: #fff;
}

.footer-item {
  text-align: center;
  color: #555;
}
</style>
